<!--shell#index.html-->
<!--head-->
<title>${user.name}的博客</title>
<!--head end-->
<!--body-->
<style>
    #sidebar h4 {
        text-align: center;
    }
    #sidebar li {
        margin: 5px;
    }
    #sidebar strong.head {
        font-size: 13px;
        margin-left: 15px;
        margin-top: 25px;
        display: block;
    }
    #sidebar li a.active {
        color: red;
        font-weight: bold;
    }
</style>
<div class="row" style="padding: 10px 0">
    <div class="span3" id="sidebar">
        <h4><a href="/user/${user.id}">${user.name}</a>的空间</h4>
        <strong class="head">文章标签</strong>
        <ul>
            <li>
                <a class="${tag==null?'active':null}" href="/user/${user.id}">全部文章(${user.articleCount})</a>
            </li>
            <li w:t="user.tagList.entrySet()">
                <a class="${tag==#t.key?'active':null}" href="/user/${user.id}/${#t.key}">${#t.key}(${#t.value})</a>
            </li>
        </ul>
        <strong class="head">最新评论</strong>
        <ul>
            <li>

            </li>
        </ul>
    </div>
    <div class="span9" id="content">
        <a href="/edit_article.html" w:="host">发表文章</a>
        <!--content-->
        <style>
            #content ul {
                margin-top: 20px;
            }
            #content li {
                list-style: none;
            }
            #content > ul > li {
                padding-bottom: 5px;
                margin-bottom: 15px;
                border-bottom: 1px dotted #cccccc;
            }
            #content li a.title {
                font-size: 16px;
                font-weight: bold;
            }
            #content li div.tags {
                margin: 5px 0;
            }
            #content li div.tags a {
                margin: 0 5px;
            }
            #content li ul {
                text-align: right;
                color: gray;
            }
            #content li ul li {
                display: inline-block;
                padding: 0 10px;
            }
            #content li ul li.date {
                border-right: none;
            }
        </style>
        <ul>
            <li w:a="articles">
                <a href="/article/${#a.id}" class="title">${#a.title}</a>
                <div class="tags">
                    <strong>文章标签：</strong>
                    <a href="/user/${user.id}/${#t}" w:t="#a.tagList">${#t}</a>
                </div>
                <p>${#a.getShortContent(250)}</p>
                <ul>
                    <li><a href="/edit_article.html?article.id=${#a.id}" w:="host">编辑</a></li>
                    <li><a href="/article/${#a.id}">浏览(${#a.view})</a></li>
                    <li><a href="/article/${#a.id}#comments">评论(${#a.commentCount})</a></li>
                    <li class="date">${#a.postDate.toLocaleString()}</li>
                </ul>
            </li>
        </ul>
        <div class="pagination pagination-right">
            <ul>
                <li class="previous${pg==1?' disabled':''}">
                    <a href="/user/${user.id}/${tag==null?'':tag}">首页</a>
                </li>
                <li class="previous${pg<=1?' disabled':''}">
                    <a href="/user/${user.id}/${tag==null?'':tag}?pg=${pg-1}">«</a>
                </li>
                <li w:p="pgs" class="${pg==#p?'active':null}">
                    <a href="/user/${user.id}/${tag==null?'':tag}?pg=${#p}">${#p}</a>
                </li>
                <li class="previous${pg>=pageCount?' disabled':''}">
                    <a href="/user/${user.id}/${tag==null?'':tag}?pg=${pg+1}">»</a>
                </li>
                <li class="previous${pg==pageCount?' disabled':''}">
                    <a href="/user/${user.id}/${tag==null?'':tag}?pg=${pageCount}">末页</a>
                </li>
            </ul>
        </div>
        <!--content end-->
    </div>
</div>
<!--body end-->
<!--shell#index.html end-->